<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div>
        隐式转换
    </div>
    <script>
        console.log(1 + '2') // 12,先把字符串转成number类型再比交
        console.log(2 > '3') //false
        console.log(2 < '3') //true,先把字符串转成number类型再比交
        console.log(1 + true) //2
        console.log(1 + 'true') //1true
        console.log("比较null")
        console.log(0 == null) //false ,null不会转换.可以用Number转换
        console.log(0 == undefined) //false  undefined本身就是undefined类型
        console.log(null == undefined) //true
        console.log(0 >= null); // true
        console.log(0 >= undefined) //false
    </script>
</body>

</html>